package com.sword.mapper;

import com.sword.pojo.Brand;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface BrandMapper {

    @Select("select  * from tb_brand")
    @ResultMap("brandMap")
    List<Brand> selectAll();

    void add(Brand brand);

    @Select("select  * from tb_brand where id = #{id}")
    @ResultMap("brandMap")
    Brand selectById(int id);

    void update(Brand brand);

    void deleteById(int id);
}
